import request from '@src/utils/request';
import { URL } from '@src/configs/constant';

// 链数据统计
export async function getChainDecimal(params) {
  const { ChainId = '' } = params;
  const res = await request({
    url: URL,
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    params: {
      cmb: 'ChainDecimal',
      ChainId,
    },
  });
  return res;
}

// 查询交易详情
export async function getBlockDetail(params) {
  const { Id = 0 } = params;
  const res = await request({
    url: URL,
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    params: {
      cmb: 'GetBlockDetail',
      Id,
    },
  });
  return res;
}
